﻿namespace LogicStudio.Framework.UI.Conversores
{
    using System;
    using System.Globalization;
    using System.ServiceModel.DomainServices.Client;
    using System.Windows.Data;

    public class CampoObjetoEditable : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var entity = (Entity)value;
            return entity.EntityState == EntityState.New;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return true;
        }
    }
}
